package com.java;

import java.io.IOException;
import java.net.Inet4Address;
import java.net.InetAddress;
import java.net.ServerSocket;
import java.net.Socket;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Scanner;

import com.google.gson.Gson;


public class Main {
	
	
	 static Map<String, client> somap = new HashMap<>();
	static Socket socket = null;
	static ServerSocket serverSocket = null;

	
	public static void main(String[] args) throws IOException
	{
		
		new android().start();
		String localString=Inet4Address.getLocalHost().getHostAddress().toString();
		
		try{
			serverSocket = new ServerSocket(3000);
			System.out.println(localString);
		} catch (IOException e1)
		{
			e1.printStackTrace();
		}

		while (true)
		{
			try
			{
				socket = serverSocket.accept();
			} catch (IOException e)
			{
			}
			client client=new client(socket);
			somap.put(client.IP, client);
		}

	}

}